home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 January: Mac OS SDK / Dev.CD Jan 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / AIncludes / ADSP.a next >
Encoding:
Text File  |  1998-08-17  |  7.7 KB  |  159 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        ADSP.a
  3. ;
  4. ;    Contains:    AppleTalk Data Stream Protocol (ADSP) Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1986-1998, 1995-1997 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__ADSP__') = 'UNDEFINED' THEN
  18. __ADSP__ SET 1
  19.  
  20.     IF &TYPE('__ERRORS__') = 'UNDEFINED' THEN
  21.     include 'Errors.a'
  22.     ENDIF
  23.     IF &TYPE('__APPLETALK__') = 'UNDEFINED' THEN
  24.     include 'AppleTalk.a'
  25.     ENDIF
  26.  
  27. ; driver control csCodes
  28.  
  29. dspInit                            EQU        255                    ; create a new connection end 
  30. dspRemove                        EQU        254                    ; remove a connection end 
  31. dspOpen                            EQU        253                    ; open a connection 
  32. dspClose                        EQU        252                    ; close a connection 
  33. dspCLInit                        EQU        251                    ; create a connection listener 
  34. dspCLRemove                        EQU        250                    ; remove a connection listener 
  35. dspCLListen                        EQU        249                    ; post a listener request 
  36. dspCLDeny                        EQU        248                    ; deny an open connection request 
  37. dspStatus                        EQU        247                    ; get status of connection end 
  38. dspRead                            EQU        246                    ; read data from the connection 
  39. dspWrite                        EQU        245                    ; write data on the connection 
  40. dspAttention                    EQU        244                    ; send an attention message 
  41. dspOptions                        EQU        243                    ; set connection end options 
  42. dspReset                        EQU        242                    ; forward reset the connection 
  43. dspNewCID                        EQU        241                    ; generate a cid for a connection end 
  44.  
  45.                                                             ; connection opening modes 
  46. ocRequest                        EQU        1                    ; request a connection with remote 
  47. ocPassive                        EQU        2                    ; wait for a connection request from remote 
  48. ocAccept                        EQU        3                    ; accept request as delivered by listener 
  49. ocEstablish                        EQU        4                    ; consider connection to be open 
  50.  
  51.                                                             ; connection end states 
  52. sListening                        EQU        1                    ; for connection listeners 
  53. sPassive                        EQU        2                    ; waiting for a connection request from remote 
  54. sOpening                        EQU        3                    ; requesting a connection with remote 
  55. sOpen                            EQU        4                    ; connection is open 
  56. sClosing                        EQU        5                    ; connection is being torn down 
  57. sClosed                            EQU        6                    ; connection end state is closed 
  58.  
  59.                                                             ; client event flags 
  60. eClosed                            EQU        $80                    ; received connection closed advice 
  61. eTearDown                        EQU        $40                    ; connection closed due to broken connection 
  62. eAttention                        EQU        $20                    ; received attention message 
  63. eFwdReset                        EQU        $10                    ; received forward reset advice 
  64.  
  65.                                                             ; miscellaneous constants 
  66. attnBufSize                        EQU        570                    ; size of client attention buffer 
  67. minDSPQueueSize                    EQU        100                    ; Minimum size of receive or send Queue 
  68. ;  connection control block 
  69.  
  70.  
  71. ; typedef TRCCB *                        TPCCB
  72.  
  73. TRCCB                    RECORD 0
  74. ccbLink                     ds.l    1                ; offset: $0 (0)        ;  link to next ccb 
  75. refNum                     ds.w    1                ; offset: $4 (4)        ;  user reference number 
  76. state                     ds.w    1                ; offset: $6 (6)        ;  state of the connection end 
  77. userFlags                 ds.b    1                ; offset: $8 (8)        ;  flags for unsolicited connection events 
  78. localSocket                 ds.b    1                ; offset: $9 (9)        ;  socket number of this connection end 
  79. remoteAddress             ds        AddrBlock        ; offset: $A (10)        ;  internet address of remote end 
  80. attnCode                 ds.w    1                ; offset: $E (14)        ;  attention code received 
  81. attnSize                 ds.w    1                ; offset: $10 (16)        ;  size of received attention data 
  82. attnPtr                     ds.l    1                ; offset: $12 (18)        ;  ptr to received attention data 
  83. reserved                 ds.b    220                ; offset: $16 (22)        ;  for adsp internal use 
  84. sizeof                     EQU *                    ; size:   $F2 (242)
  85.                         ENDR
  86. DSPParamBlock            RECORD 0
  87. qLink                     ds.l    1                ; offset: $0 (0)
  88. qType                     ds.w    1                ; offset: $4 (4)
  89. ioTrap                     ds.w    1                ; offset: $6 (6)
  90. ioCmdAddr                 ds.l    1                ; offset: $8 (8)
  91. ioCompletion             ds.l    1                ; offset: $C (12)
  92. ioResult                 ds.w    1                ; offset: $10 (16)
  93. ioNamePtr                 ds.l    1                ; offset: $12 (18)
  94. ioVRefNum                 ds.w    1                ; offset: $16 (22)
  95. ioCRefNum                 ds.w    1                ; offset: $18 (24)        ;  adsp driver refNum 
  96. csCode                     ds.w    1                ; offset: $1A (26)        ;  adsp driver control code 
  97. qStatus                     ds.l    1                ; offset: $1C (28)        ;  adsp internal use 
  98. ccbRefNum                 ds.w    1                ; offset: $20 (32)
  99. ccbPtr                     ds.l    1                ; offset: $22 (34)        ;  pointer to connection control block 
  100. userRoutine                 ds.l    1                ; offset: $26 (38)        ;  client routine to call on event 
  101. sendQSize                 ds.w    1                ; offset: $2A (42)        ;  size of send queue (0..64K bytes) 
  102. sendQueue                 ds.l    1                ; offset: $2C (44)        ;  client passed send queue buffer 
  103. recvQSize                 ds.w    1                ; offset: $30 (48)        ;  size of receive queue (0..64K bytes) 
  104. recvQueue                 ds.l    1                ; offset: $32 (50)        ;  client passed receive queue buffer 
  105. attnPtr                     ds.l    1                ; offset: $36 (54)        ;  client passed receive attention buffer 
  106. localSocket                 ds.b    1                ; offset: $3A (58)        ;  local socket number 
  107. filler1                     ds.b    1                ; offset: $3B (59)        ;  filler for proper byte alignment 
  108.                          ORG 34
  109. localCID                 ds.w    1                ; offset: $22 (34)        ;  local connection id 
  110. remoteCID                 ds.w    1                ; offset: $24 (36)        ;  remote connection id 
  111. remoteAddress             ds        AddrBlock        ; offset: $26 (38)        ;  address of remote end 
  112. filterAddress             ds        AddrBlock        ; offset: $2A (42)        ;  address filter 
  113. sendSeq                     ds.l    1                ; offset: $2E (46)        ;  local send sequence number 
  114. sendWindow                 ds.w    1                ; offset: $32 (50)        ;  send window size 
  115. recvSeq                     ds.l    1                ; offset: $34 (52)        ;  receive sequence number 
  116. attnSendSeq                 ds.l    1                ; offset: $38 (56)        ;  attention send sequence number 
  117. attnRecvSeq                 ds.l    1                ; offset: $3C (60)        ;  attention receive sequence number 
  118. ocMode                     ds.b    1                ; offset: $40 (64)        ;  open connection mode 
  119. ocInterval                 ds.b    1                ; offset: $41 (65)        ;  open connection request retry interval 
  120. ocMaximum                 ds.b    1                ; offset: $42 (66)        ;  open connection request retry maximum 
  121. filler2                     ds.b    1                ; offset: $43 (67)        ;  filler for proper byte alignment 
  122.                          ORG 34
  123. abort                     ds.b    1                ; offset: $22 (34)        ;  abort connection immediately if non-zero 
  124. filler3                     ds.b    1                ; offset: $23 (35)        ;  filler for proper byte alignment 
  125.                          ORG 34
  126. reqCount                 ds.w    1                ; offset: $22 (34)        ;  requested number of bytes 
  127. actCount                 ds.w    1                ; offset: $24 (36)        ;  actual number of bytes 
  128. dataPtr                     ds.l    1                ; offset: $26 (38)        ;  pointer to data buffer 
  129. eom                         ds.b    1                ; offset: $2A (42)        ;  indicates logical end of message 
  130. flush                     ds.b    1                ; offset: $2B (43)        ;  send data now 
  131.                          ORG 34
  132. attnCode                 ds.w    1                ; offset: $22 (34)        ;  client attention code 
  133. attnSize                 ds.w    1                ; offset: $24 (36)        ;  size of attention data 
  134. attnData                 ds.l    1                ; offset: $26 (38)        ;  pointer to attention data 
  135. attnInterval             ds.b    1                ; offset: $2A (42)        ;  retransmit timer in 10-tick intervals 
  136. filler4                     ds.b    1                ; offset: $2B (43)        ;  filler for proper byte alignment 
  137.                          ORG 34
  138. statusCCB                 ds.l    1                ; offset: $22 (34)        ;  pointer to ccb 
  139. sendQPending             ds.w    1                ; offset: $26 (38)        ;  pending bytes in send queue 
  140. sendQFree                 ds.w    1                ; offset: $28 (40)        ;  available buffer space in send queue 
  141. recvQPending             ds.w    1                ; offset: $2A (42)        ;  pending bytes in receive queue 
  142. recvQFree                 ds.w    1                ; offset: $2C (44)        ;  available buffer space in receive queue 
  143.                          ORG 34
  144. sendBlocking             ds.w    1                ; offset: $22 (34)        ;  quantum for data packets 
  145. sendTimer                 ds.b    1                ; offset: $24 (36)        ;  send timer in 10-tick intervals 
  146. rtmtTimer                 ds.b    1                ; offset: $25 (37)        ;  retransmit timer in 10-tick intervals 
  147. badSeqMax                 ds.b    1                ; offset: $26 (38)        ;  threshold for sending retransmit advice 
  148. useCheckSum                 ds.b    1                ; offset: $27 (39)        ;  use ddp packet checksum 
  149.                          ORG 34
  150. newcid                     ds.w    1                ; offset: $22 (34)        ;  new connection id returned 
  151.                          ORG 68
  152. sizeof                     EQU *                    ; size:   $44 (68)
  153.                         ENDR
  154. ; typedef struct DSPParamBlock *        DSPPBPtr
  155.  
  156.  
  157.     ENDIF ; __ADSP__ 
  158.  
  159.